package com.yunpeng.dishes.dao.mapper.relation;

import com.yunpeng.dishes.dao.mapper.IRelationMapper;
import com.yunpeng.dishes.dao.model.relation.DishesFoodIngredientsDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * IDishesFoodIngredientsMapper
 *
 * @author : Moore(hemw)
 * @date : 2020-03-26
 */
@Mapper
public interface IDishesFoodIngredientsMapper extends IRelationMapper<DishesFoodIngredientsDO> {

    /**
     * 根据菜品代码获取食材列表
     *
     * @param codes
     * @return
     */
    List<DishesFoodIngredientsDO> queryForListByDishesCodes(@Param(value = "codes") List<String> codes);

    /**
     * 批量写入
     *
     * @param dishesFoodIngredientsDOList
     */
    void batchAdd(@Param(value = "dos") List<DishesFoodIngredientsDO> dishesFoodIngredientsDOList);

    /**
     * 根据菜品代码软删除数据
     *
     * @param code
     */
    void deleteByDishesCode(@Param(value = "code") String code);
}
